@extends('../layouts.base')  

@section('content')
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		医生管理
		<span class="c-gray en">&gt;</span>
		提现列表 <a class="btn btn-primary radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			
			<div>
				<form method="get" action="/doctor/withdraw/index">
					状态:<span class="select-box" style="width: 10%;">
					  <select class="select" size="1" name="status">
					  	<option value="">全部</option>
					    <option value="0">未审核</option>
					    <option value="1">审核失败</option>
					    <option value="2">审核通过</option> 
					    <option value="3">完成打款</option> 
					  </select>
					</span>
					
					姓名：<input type="text" class="input-text" style="width:120px" placeholder="输入医生姓名" id="name" name="name">
					 日期范围：
					<input name="start_time" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
					-
					<input name="end_time" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
					
					<button type="submit" class="btn btn-primary" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
				</form>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<!--<span class="l"> 
					<a href="/article/cate/add" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>添加</a> 
				</span>-->
			</div>
			<table id="table" class="table table-border table-bordered table-bg" current_page="{{$data['data']->currentPage()}}" >
				<thead>
					<tr>
						<th scope="col" colspan="7">提现列表</th>
					</tr>
					<tr class="text-c">
						<th width="25"><input type="checkbox" name="" value=""></th>
						<th width="40">ID</th>
						<th width="150">医生姓名</th>
						<th width="150">提现金额</th>
						<th width="150">状态</th>
						<th width="130">添加时间</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
					
					@if($data['code'] == 1)		
					@foreach ($data['data'] as $item)
						<tr class="text-c">
							<td><input type="checkbox" value="1" name=""></td>
							<td>{{$item->id}}</td>
							<td>{{$item->doctor->name}}</td>
							<td>{{$item->money}}</td>
							<td>
								@if($item->status == 0)
									未审核
								@elseif($item->status == 1)
									<span style="color:red">审核失败</span> 
								@elseif($item->status == 2)
									<span style="color:green">审核成功</span> 
								@elseif($item->status == 3)
									<span style="color:blueviolet">打款成功</span> 
								@endif
							</td>
							<td>{{$item->created_at}}</td>
							<td class="td-manage">
								@if ($item->status === 0)
									<a class='btn btn-danger size-MINI statusOperate' data-id="{{$item->id}}" data-status="0" href="javascript:;" title="审核">审核</a>									
								@elseif($item->status === 2)
   									<a class='btn btn-primary size-MINI statusOperate' data-id="{{$item->id}}" data-status="3" href="javascript:;" title="打款">打款</a>
								@endif
								<a title="编辑" href="/doctor/withdraw/edit?id={{$item->id}}"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> 
								<a title="删除" href="javascript:;" onclick="admin_del(this,{{$item->id}},'/doctor/withdraw/delete','/doctor/withdraw/index')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
							</td>
						</tr>
					@endforeach	
									
					@else
						<tr>
							<td colspan="7" style="text-align: center;">{{$data['msg']}}</td>
						</tr>
					@endif					
					
					
				</tbody>
			</table>
			
		</article>
	</div>
</section>
@endsection




@section('script')
<script type="text/javascript" src="/HadminPage/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/laypage/1.2/laypage.js"></script> 
	
<script type="text/javascript">
	
var SCOPE = {
    'status_url' : '/doctor/withdraw/status',
    'jump_url' : '/doctor/withdraw/index',
}
</script> 
@endsection







